package com.cqie.secondhandtransaction.DTO;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.lang.annotation.Native;


@Data
public class AccessDTO {

    @ApiModelProperty("评价星级")
    @NotNull(message = "状态不能为空！")
    @Range(min = 1, max = 5, message = "状态值必须在0到5之间")
    private Integer qualityScore;

    @ApiModelProperty("评价星级")
    @NotNull(message = "状态不能为空！")
    @Range(min = 1, max = 5, message = "状态值必须在0到5之间")
    private Integer descScore;

    @ApiModelProperty("评价星级")
    @NotNull(message = "状态不能为空！")
    @Range(min = 1, max = 5, message = "状态值必须在0到5之间")
    private Integer serviceScore;

    @ApiModelProperty("评价内容")
    @NotBlank(message = "评价内容不能为空")
    private String desc;

    @ApiModelProperty("商品id")
    @Positive(message = "填写正确的id")
    private Integer productId;

}
